.class Lcom/htc/android/footprints/view/LocationController$1;
.super Ljava/lang/Object;
.source "LocationController.java"

# interfaces
.implements Landroid/location/LocationListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/htc/android/footprints/view/LocationController;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/htc/android/footprints/view/LocationController;


# direct methods
.method constructor <init>(Lcom/htc/android/footprints/view/LocationController;)V
    .locals 0
    .parameter

    .prologue
    .line 450
    iput-object p1, p0, Lcom/htc/android/footprints/view/LocationController$1;->this$0:Lcom/htc/android/footprints/view/LocationController;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public declared-synchronized onLocationChanged(Landroid/location/Location;)V
    .locals 9
    .parameter "location"

    .prologue
    const-string v7, "gps"

    const-string v7, "LocationController"

    .line 401
    monitor-enter p0

    :try_start_0
    invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J

    move-result-wide v2

    .line 402
    .local v2, now:J
    const-wide/16 v7, 0x2710

    sub-long v5, v2, v7

    .line 404
    .local v5, then:J
    invoke-virtual {p1}, Landroid/location/Location;->getProvider()Ljava/lang/String;

    move-result-object v1

    .line 405
    .local v1, name:Ljava/lang/String;
    iget-object v7, p0, Lcom/htc/android/footprints/view/LocationController$1;->this$0:Lcom/htc/android/footprints/view/LocationController;

    #getter for: Lcom/htc/android/footprints/view/LocationController;->mEnabledProviders:Ljava/util/ArrayList;
    invoke-static {v7}, Lcom/htc/android/footprints/view/LocationController;->access$000(Lcom/htc/android/footprints/view/LocationController;)Ljava/util/ArrayList;

    move-result-object v7

    invoke-virtual {v7}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v0

    .local v0, i$:Ljava/util/Iterator;
    :cond_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v7

    if-eqz v7, :cond_1

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lcom/htc/android/footprints/view/LocationController$NameAndDate;

    .line 406
    .local v4, provider:Lcom/htc/android/footprints/view/LocationController$NameAndDate;
    iget-object v7, v4, Lcom/htc/android/footprints/view/LocationController$NameAndDate;->name:Ljava/lang/String;

    invoke-virtual {v7, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_4

    .line 407
    iput-wide v2, v4, Lcom/htc/android/footprints/view/LocationController$NameAndDate;->date:J

    .line 415
    .end local v4           #provider:Lcom/htc/android/footprints/view/LocationController$NameAndDate;
    :cond_1
    const-string v7, "gps"

    invoke-virtual {v1, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_5

    .line 419
    iget-object v7, p0, Lcom/htc/android/footprints/view/LocationController$1;->this$0:Lcom/htc/android/footprints/view/LocationController;

    #getter for: Lcom/htc/android/footprints/view/LocationController;->mLocation:Landroid/location/Location;
    invoke-static {v7}, Lcom/htc/android/footprints/view/LocationController;->access$100(Lcom/htc/android/footprints/view/LocationController;)Landroid/location/Location;

    move-result-object v7

    invoke-virtual {v7, p1}, Landroid/location/Location;->set(Landroid/location/Location;)V

    .line 422
    iget-object v7, p0, Lcom/htc/android/footprints/view/LocationController$1;->this$0:Lcom/htc/android/footprints/view/LocationController;

    #getter for: Lcom/htc/android/footprints/view/LocationController;->isFixGps:Z
    invoke-static {v7}, Lcom/htc/android/footprints/view/LocationController;->access$200(Lcom/htc/android/footprints/view/LocationController;)Z

    move-result v7

    if-nez v7, :cond_2

    .line 423
    const-string v7, "LocationController"

    const-string v8, "Fix GPS"

    invoke-static {v7, v8}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 424
    iget-object v7, p0, Lcom/htc/android/footprints/view/LocationController$1;->this$0:Lcom/htc/android/footprints/view/LocationController;

    const/4 v8, 0x1

    #setter for: Lcom/htc/android/footprints/view/LocationController;->isFixGps:Z
    invoke-static {v7, v8}, Lcom/htc/android/footprints/view/LocationController;->access$202(Lcom/htc/android/footprints/view/LocationController;Z)Z

    .line 425
    iget-object v7, p0, Lcom/htc/android/footprints/view/LocationController$1;->this$0:Lcom/htc/android/footprints/view/LocationController;

    #calls: Lcom/htc/android/footprints/view/LocationController;->onGpsFix()V
    invoke-static {v7}, Lcom/htc/android/footprints/view/LocationController;->access$300(Lcom/htc/android/footprints/view/LocationController;)V

    .line 428
    :cond_2
    iget-object v7, p0, Lcom/htc/android/footprints/view/LocationController$1;->this$0:Lcom/htc/android/footprints/view/LocationController;

    #getter for: Lcom/htc/android/footprints/view/LocationController;->mClientListener:Lcom/htc/android/footprints/view/LocationController$ControllerListerner;
    invoke-static {v7}, Lcom/htc/android/footprints/view/LocationController;->access$400(Lcom/htc/android/footprints/view/LocationController;)Lcom/htc/android/footprints/view/LocationController$ControllerListerner;

    move-result-object v7

    if-eqz v7, :cond_3

    .line 429
    iget-object v7, p0, Lcom/htc/android/footprints/view/LocationController$1;->this$0:Lcom/htc/android/footprints/view/LocationController;

    #getter for: Lcom/htc/android/footprints/view/LocationController;->mClientListener:Lcom/htc/android/footprints/view/LocationController$ControllerListerner;
    invoke-static {v7}, Lcom/htc/android/footprints/view/LocationController;->access$400(Lcom/htc/android/footprints/view/LocationController;)Lcom/htc/android/footprints/view/LocationController$ControllerListerner;

    move-result-object v7

    iget-object v8, p0, Lcom/htc/android/footprints/view/LocationController$1;->this$0:Lcom/htc/android/footprints/view/LocationController;

    #getter for: Lcom/htc/android/footprints/view/LocationController;->mLocation:Landroid/location/Location;
    invoke-static {v8}, Lcom/htc/android/footprints/view/LocationController;->access$100(Lcom/htc/android/footprints/view/LocationController;)Landroid/location/Location;

    move-result-object v8

    invoke-interface {v7, v8}, Lcom/htc/android/footprints/view/LocationController$ControllerListerner;->onUpdateLocation(Landroid/location/Location;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 442
    :cond_3
    :goto_0
    monitor-exit p0

    return-void

    .line 409
    .restart local v4       #provider:Lcom/htc/android/footprints/view/LocationController$NameAndDate;
    :cond_4
    :try_start_1
    iget-object v7, v4, Lcom/htc/android/footprints/view/LocationController$NameAndDate;->name:Ljava/lang/String;

    const-string v8, "gps"

    invoke-virtual {v7, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_0

    iget-wide v7, v4, Lcom/htc/android/footprints/view/LocationController$NameAndDate;->date:J

    cmp-long v7, v7, v5

    if-lez v7, :cond_0

    .line 410
    const-string v7, "LocationController"

    const-string v8, "Got fallback update soon after preferred udpate, ignoring"

    invoke-static {v7, v8}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_0

    .line 401
    .end local v0           #i$:Ljava/util/Iterator;
    .end local v1           #name:Ljava/lang/String;
    .end local v2           #now:J
    .end local v4           #provider:Lcom/htc/android/footprints/view/LocationController$NameAndDate;
    .end local v5           #then:J
    :catchall_0
    move-exception v7

    monitor-exit p0

    throw v7

    .line 432
    .restart local v0       #i$:Ljava/util/Iterator;
    .restart local v1       #name:Ljava/lang/String;
    .restart local v2       #now:J
    .restart local v5       #then:J
    :cond_5
    :try_start_2
    const-string v7, "network"

    invoke-virtual {v1, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_3

    .line 433
    iget-object v7, p0, Lcom/htc/android/footprints/view/LocationController$1;->this$0:Lcom/htc/android/footprints/view/LocationController;

    #getter for: Lcom/htc/android/footprints/view/LocationController;->isFixNetwork:Z
    invoke-static {v7}, Lcom/htc/android/footprints/view/LocationController;->access$500(Lcom/htc/android/footprints/view/LocationController;)Z

    move-result v7

    if-nez v7, :cond_3

    .line 434
    const-string v7, "LocationController"

    const-string v8, "FimCurModex Network"

    invoke-static {v7, v8}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 435
    iget-object v7, p0, Lcom/htc/android/footprints/view/LocationController$1;->this$0:Lcom/htc/android/footprints/view/LocationController;

    const/4 v8, 0x1

    #setter for: Lcom/htc/android/footprints/view/LocationController;->isFixNetwork:Z
    invoke-static {v7, v8}, Lcom/htc/android/footprints/view/LocationController;->access$502(Lcom/htc/android/footprints/view/LocationController;Z)Z

    .line 436
    iget-object v7, p0, Lcom/htc/android/footprints/view/LocationController$1;->this$0:Lcom/htc/android/footprints/view/LocationController;

    #setter for: Lcom/htc/android/footprints/view/LocationController;->mNetworkLocation:Landroid/location/Location;
    invoke-static {v7, p1}, Lcom/htc/android/footprints/view/LocationController;->access$602(Lcom/htc/android/footprints/view/LocationController;Landroid/location/Location;)Landroid/location/Location;
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    goto :goto_0
.end method

.method public onProviderDisabled(Ljava/lang/String;)V
    .locals 0
    .parameter "s"

    .prologue
    .line 445
    return-void
.end method

.method public onProviderEnabled(Ljava/lang/String;)V
    .locals 0
    .parameter "provider"

    .prologue
    .line 448
    return-void
.end method

.method public onStatusChanged(Ljava/lang/String;ILandroid/os/Bundle;)V
    .locals 0
    .parameter "s"
    .parameter "i"
    .parameter "bundle"

    .prologue
    .line 451
    return-void
.end method
